<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<h:head>
	<title>BaseProductInserion</title>
</h:head>
<h:body>
          <p:layoutUnit id="top" position="north" size="15%">
                <p:toolbar>  
    				<p:toolbarGroup align="left">
                	<h3><h:link outcome="home.html" value="TravelDream" /></h3>
                	</p:toolbarGroup>
                	<p:toolbarGroup align="right">
                <h:form>				   
				        <p:commandButton action="#{logoutBean.logout}" value="Logout" />				
			   </h:form>
                	<p:spacer width="10"></p:spacer>               	
                	<p:spacer width="10"></p:spacer>
                	</p:toolbarGroup>
                </p:toolbar>
           </p:layoutUnit>

		<p:tabView id="tabView">  
  

    	<p:tab id="tab1" title="Flight"> 
    		 <h:form id="flightForm"> 
			<h:panelGrid columns="3" id="flightGrid">
							
			    <h:outputLabel for="depLocation">Departure location:</h:outputLabel>
				<p:inputText id="depLocation" value="#{insertionBean.flight.depLocation}" />
				<p:message for="depLocation" />
				
     		    <h:outputLabel for="depAirport">Departure airport:</h:outputLabel>
				<p:inputText id="depAirport" value="#{insertionBean.flight.depAirport}" />
				<p:message for="depAirport" />
			
		        <h:outputLabel for="arrLocation">Arrival location:</h:outputLabel>
				<p:inputText id="arrLocation" value="#{insertionBean.flight.arrLocation}" />
				<p:message for="arrLocation" />
				
				<h:outputLabel for="arrAirport">Arrival location:</h:outputLabel>
				<p:inputText id="arrAirport" value="#{insertionBean.flight.arrAirport}" />
				<p:message for="arrAirport" />
				
				<h:outputLabel for="date_Time">Take off date and time:</h:outputLabel>
				<p:calendar value="#{insertionBean.flight.date_Time}" id="date_Time" showOn="button" navigator="true" display="inline" effect="slideDown" yearRange="+0:+1" pattern="MM/dd/yyyy HH:mm" />
				<p:message for="date_Time" />
				
				<h:outputLabel for="capacity">Available seats:</h:outputLabel>
				<p:inputText id="capacity" value="#{insertionBean.flight.capacity}" />
				<p:message for="capacity" />
			
			    <h:outputLabel for="flag">Flag:</h:outputLabel>
				<p:inputText id="flag" value="#{insertionBean.flight.flag}" />
				<p:message for="flag" />
				
				<h:outputLabel for="description">Description:</h:outputLabel>
				<p:inputText id="description" value="#{insertionBean.flight.description}" />
				<p:message for="description" />
				
				<h:outputLabel for="price">Price:</h:outputLabel>
				<p:inputText id="price" value="#{insertionBean.flight.price}" />
				<p:message for="price" />
				
			</h:panelGrid>
			<p:commandButton value="Insert" update="flightGrid" action="#{insertionBean.insertFlight()}" />
		</h:form>
		</p:tab>

		
	
	<p:tab id="tab2" title="Hotel">
		<h:form id="hotelForm">	
			<h:panelGrid columns="3" id="hotelGrid">
				
			    <h:outputLabel for="hname">Name:</h:outputLabel>
				<p:inputText id="hname" value="#{insertionBean.hotel.name}" />
				<p:message for="hname" />
				
     		    <h:outputLabel for="hCountry">Country:</h:outputLabel>
				<p:inputText id="hCountry" value="#{insertionBean.hotel.country}" />
				<p:message for="hCountry" />
			
		        <h:outputLabel for="hCity">City:</h:outputLabel>
				<p:inputText id="hCity" value="#{insertionBean.hotel.city}" />
				<p:message for="hCity" />
				
				<h:outputLabel for="hAddress">Address:</h:outputLabel>
				<p:inputText id="hAddress" value="#{insertionBean.hotel.address}" />
				<p:message for="hAddress" />
								
				<h:outputLabel for="hCap">CAP/ZIP:</h:outputLabel>
				<p:inputText id="hCap" value="#{insertionBean.hotel.cap}" />
				<p:message for="hCap" />
			
			    <h:outputLabel for="hCat">Category:</h:outputLabel>
				<p:inputText id="hCat" value="#{insertionBean.hotel.category}" />
				<p:message for="hCat" />
								
				<h:outputLabel for="hprice">Price/Night:</h:outputLabel>
				<p:inputText id="hprice" value="#{insertionBean.hotel.price_Night}" />
				<p:message for="hprice" />
				
				<h:outputLabel for="hdescription">Description:</h:outputLabel>
				<p:inputText id="hdescription" value="#{insertionBean.hotel.description}" />
				<p:message for="hdescription" />
				
				<h:outputLabel for="hWebsite">Website:</h:outputLabel>
				<p:inputText id="hWebsite" value="#{insertionBean.hotel.website}" />
				<p:message for="hWebsite" />
				
			</h:panelGrid>
			<p:commandButton value="Insert" update="hotelGrid" action="#{insertionBean.insertHotel()}" />
		</h:form>	
	</p:tab>
		

	
<p:tab id="tab3" title="Excursion">
	<h:form id="excForm">	
			<h:panelGrid columns="3" id="excursionGrid">
	
			    <h:outputLabel for="ename">Name:</h:outputLabel>
				<p:inputText id="ename" value="#{insertionBean.excursion.name}" />
				<p:message for="ename" />
				
     		    <h:outputLabel for="eCity">City:</h:outputLabel>
				<p:inputText id="eCity" value="#{insertionBean.excursion.city}" />
				<p:message for="eCity" />
			
		        <h:outputLabel for="eType">Type:</h:outputLabel>
				<p:inputText id="eType" value="#{insertionBean.excursion.type}" />
				<p:message for="eType" />
				
				<h:outputLabel for="eDescription">Description:</h:outputLabel>
				<p:inputText id="eDescription" value="#{insertionBean.excursion.description}" />
				<p:message for="eDescription" />
								
				<h:outputLabel for="eWebsite">Website:</h:outputLabel>
				<p:inputText id="eWebsite" value="#{insertionBean.excursion.website}" />
				<p:message for="eWebsite" />

				<h:outputLabel for="eDate">Date:</h:outputLabel>
				<p:calendar value="#{insertionBean.excursion.date}" id="eDate" showOn="button" navigator="true" display="inline" effect="slideDown" yearRange="+0:+1" />
				<p:message for="eDate" />
							
			    <h:outputLabel for="ePrice">Price:</h:outputLabel>
				<p:inputText id="ePrice" value="#{insertionBean.excursion.price}" />
				<p:message for="ePrice" />
								
				<h:outputLabel for="eCapacity">Capacity:</h:outputLabel>
				<p:inputText id="eCapacity" value="#{insertionBean.excursion.capacity}" />
				<p:message for="eCapacity" />
				
			</h:panelGrid>
			<p:commandButton value="Insert" update="excursionGrid" action="#{insertionBean.insertExcursion()}" />
			</h:form>
		</p:tab>
		
</p:tabView>
	
</h:body>
</html>